<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<html>
	<head>
	</head>
	<link rel="stylesheet" type="text/css" href="lucar-css/head-css.css" />
	<link rel="stylesheet" type="text/css" href="lucar-css/returnorders-css.css">

	<body>
	  	<div id="head">
			<div id="h-logo">
				<img src="lucar-image/logo.png" class="hl">
			</div>
			<div id="h-right">
				<span id="hr-useCar" class="hr-span" onmouseover="headimg(1);" onMouseOut="headimg(2);">
					<img id="uCOut" src="lucar-image/useCar-Out.png" class="hr-image" style="display:block">
					<img id="uCOn" src="lucar-image/useCar-On.png" class="hr-image" style="display:none">
				</span>
				<span id="hr-aboutUs" class="hr-span" onmouseover="headimg(3);" onMouseOut="headimg(4);">
					<img id="aUOut" src="lucar-image/aboutUs-Out.png" class="hr-image" style="display:block">
					<img id="aUOn" src="lucar-image/aboutUs-On.png" class="hr-image" style="display:none">
				</span>
				<span id="register" class="button" onMouseOver="headbutton(1);" onMouseOut="headbutton(2);"><b class="hr-text">注册</b></span>
				<span id="login" class="button" onMouseOver="headbutton(3);" onMouseOut="headbutton(4);"><b class="hr-text">登录</b></span>
			</div>
		</div>
		<div id="order_div">
			<jsp:useBean id="time" class="java.util.Date"/> 
			<s:form action="returnCar" namespace="/">
				<%@ page import="java.util.*,order.domain.Orders,car.domain.CarInfo,car.dao.*,order.dao.*"%>
				<% 
					request.setCharacterEncoding("utf-8");
					OrderDao orderDao=new OrderDaoImpl();
					Orders order1=orderDao.searchOrder("1002");
					Orders orders=(Orders)session.getAttribute("orders");
					
					String carId=orders.getCarId();
				   CarInfoDao dao=new CarInfoDaoImpl();
				   CarInfo carInfo=(CarInfo)dao.selectCar("select c from CarInfo c where c.carId='"+carId+"'");
				   
					 %>
				<div id="order_head">
					<label id="orderNo">订单号：</label><s:textfield id="orderNo_input" name="orders.orderNo" value="%{#session.orders.orderNo}" readonly="true"/>
					<label id="beginPark">借车点：</label><s:textfield id="beginPark_input" name="orders.beginParkId" value="%{#session.orders.beginParkId }" readonly="true"/>
					<label id="beginTime">下单时间：</label><s:textfield id="beginTime_input" name="orders.beginTime" value="%{#session.orders.beginTime }" readonly="true"/>
				</div>
				<div id="order-show">
					<div id="carImg"></div>
					<span id="carId_span">汽车ID：</span>
					<s:textfield id="carId_input" name="orders.carId" value="%{#session.orders.carId}" readonly="true"/>
					<span id="carName_span">汽车名称：</span>
					<span id="carName"><%=carInfo.getCarName() %></span>
					<span id="carType_span">汽车类型：</span>
					<span id="carType"><%=carInfo.getCarType() %></span>
					<span id="userId_span">用户名：</span>
					<s:textfield id="userId" name="orders.userId" value="%{#session.orders.userId}" readonly="true"/>
					<span id="userName_span">用户姓名：</span>
					<span id="userName"></span>
					<span id="endPark">选择还车点：</span>
					<s:select list="#{'111':'111','112':'112','113':'113','114':'114','115':'115','116':'116','117':'117','118':'118' }" 
						name="orders.endParkId" id="endParkId" value="2">
					</s:select>
					<span id="orderStatus_span">订单状态：</span>
					<span id="orderStatus">未还车</span>
				</div>
				<s:submit value="还车" id="orderSubmit"/>
			</s:form>
		</div>
	</body>

<script src="lucar-script/head-script.js"></script>
<script type="text/javascript">
window.onload = function(){
	function box(){
		var oBox = document.getElementById("order_div");
		var L1 = oBox.offsetWidth;
		var Left = (document.documentElement.clientWidth-L1)/2;
		oBox.style.left = Left+'px';
	}
	box();
	window.onresize = function(){
		box();
	}
}
</script>

</html>